Repository navigation
feat(mesh-ops): intent-driven presets for printing, game and web - #430
Merged
Merged
Conversation
Add prepare_for_printing, prepare_for_game and prepare_for_web as registry ops in a new "presets" category. Each composes the existing ops (repair_mesh, semantic transforms, decimate) plus a normals recompute, writes a single output file and reports every step in its details. They are exposed to the chat agent, and the system prompt routes printing/game/web intents to them in one call. Closes #299
…mp dir in presets recompute_normals now fixes the face winding before deriving normals, so a mesh exported inside out comes out with outward normals. The presets also create context.temp_dir when a workflow points it at a folder that does not exist yet.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #299
What
Three new registry ops in a new
presetscategory, each one chaining existing ops in a single call:prepare_for_printingsize_mm(100),dimensionprepare_for_gametarget_faces(20 000),size_m(1),dimensionprepare_for_webtarget_faces(5 000)stepslist with one summary per step, plusface_count/dimensions.AgentTool, so it becomes a chat tool automatically (T-B2 — Generate agent tools from the registry #301). The system prompt tells the model to call the preset once for these intents instead of chaining ops.recompute_normalsturns inside-out faces outwards first, then derives smooth vertex normals from the faces. UVs and materials are kept.Limitations
Tests
api/tests/test_mesh_ops_presets.py(11 tests): watertight + scaled + grounded print output, decimate/scale/normals chains, inside-out winding fixed, textures kept on web, one output file per run, agent tools exposed.npm run test: Python 377 OK (5 skipped), Node 125 + 212 pass.npm run lintclean.